package com.openbravo.pos.mant;

import com.openbravo.basic.BasicException;
import com.openbravo.data.gui.ListCellRendererBasic;
import com.openbravo.data.loader.Datas;
import com.openbravo.data.loader.TableDefinition;
import com.openbravo.data.loader.Vectorer;
import com.openbravo.data.user.EditorRecord;
import com.openbravo.data.user.ListProvider;
import com.openbravo.data.user.ListProviderCreator;
import com.openbravo.data.user.SaveProvider;
import com.openbravo.format.Formats;
import com.openbravo.pos.forms.AppLocal;
import com.openbravo.pos.forms.AppView;
import com.openbravo.pos.forms.DataLogicSales;
import com.openbravo.pos.panels.JPanelTable;
import javax.swing.ListCellRenderer;

public class JPanelPlaces extends JPanelTable
{
  private TableDefinition tplaces;
  private PlacesEditor jeditor;

  protected void init()
  {
    DataLogicSales localDataLogicSales = null;
    localDataLogicSales = (DataLogicSales)this.app.getBean("com.openbravo.pos.forms.DataLogicSales");
    this.tplaces = new TableDefinition(this.app.getSession(), "PLACES", new String[] { "ID", "NAME", "X", "Y", "FLOOR" }, new String[] { "ID", AppLocal.getIntString("Label.Name"), "X", "Y", AppLocal.getIntString("label.placefloor") }, new Datas[] { Datas.STRING, Datas.STRING, Datas.INT, Datas.INT, Datas.STRING }, new Formats[] { Formats.STRING, Formats.STRING, Formats.INT, Formats.INT, Formats.NULL }, new int[] { 0 });
    this.jeditor = new PlacesEditor(localDataLogicSales, this.dirty);
  }

  public ListProvider getListProvider()
  {
    return new ListProviderCreator(this.tplaces);
  }

  public SaveProvider getSaveProvider()
  {
    return new SaveProvider(this.tplaces);
  }

  public Vectorer getVectorer()
  {
    return this.tplaces.getVectorerBasic(new int[] { 1 });
  }

  public ListCellRenderer getListCellRenderer()
  {
    return new ListCellRendererBasic(this.tplaces.getRenderStringBasic(new int[] { 1 }));
  }

  public EditorRecord getEditor()
  {
    return this.jeditor;
  }

  public String getTitle()
  {
    return AppLocal.getIntString("Menu.Tables");
  }

  public void activate()
    throws BasicException
  {
    this.jeditor.activate();
    super.activate();
  }
}

/* Location:           D:\PowerFulPOS-2.30.2\openbravopos.jar
 * Qualified Name:     com.openbravo.pos.mant.JPanelPlaces
 * JD-Core Version:    0.6.0
 */